package org.example.dao.mapper;

import org.apache.ibatis.annotations.Param;
import org.example.bean.req.DimensionQuery;
import org.example.bean.vo.ConditionVO;
import org.example.bean.condition.TempTableCondition;
import org.example.bean.vo.MerchantMarketErrorVO;
import org.example.dao.entity.DynamicViewConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 动态展示配置表 Mapper 接口
 * </p>
 *
 * @author yang jun
 * @since 2024-05-21
 */
public interface DynamicViewConfigMapper extends BaseMapper<DynamicViewConfig> {

    void explainQuery(String sql);

    List<Map<String, Object>> listDynamicInfo(@Param("data") DimensionQuery dimensionQuery);

    List<Map<String, Object>> listDynamicInfo2(@Param("ids") String ids);

    List<ConditionVO> selectConditionVOs();

    Set<Long> getTempTableMerchantIdsByStatus(TempTableCondition condition);

    int insert2(@Param("batchId") String batchId, @Param("reason") String reason, @Param("merchantIds") String merchantIds, @Param("num") Integer num);

    List<MerchantMarketErrorVO> selectErrors();
}